package physics;

/**
 *
 * @author peter
 */
public class PMatrix {
	public PVector col0;
	public PVector col1;


	// GETTERS & SETTERS
	public PVector getCol0()
	{
		return col0;
	}

	public void setCol0(PVector col0)
	{
		this.col0 = col0;
	}

	public PVector getCol1()
	{
		return col1;
	}

	public void setCol1(PVector col1)
	{
		this.col1 = col1;
	}

	// CONSTRUCTORS
	public PMatrix()
	{
	}

	public PMatrix(float angle)
	{
		float cos = (float) Math.cos(angle);
		float sin = (float) Math.sin(angle);
		col0.x = cos;
		col1.x = -sin;
		col0.y = sin;
		col1.y = cos;
	}

	public PMatrix(PVector col0, PVector col1)
	{
		this.col0.set(col0);
		this.col1.set(col1);
	}

	// METHODS

	public String toString()
	{
		return "[" + col0.x + ", " + col1.x + "]\n[" + col0.y + ", " + col1.y + "]";
	}
}
